﻿using System.Runtime.Serialization;
using Silverlight.Training.Client.Common;

namespace Silverlight.Training.Client.Common.ServiceReference.Contracts
{
    [DataContract(Namespace = ServiceConstants.ServiceNamespace, Name = "EmployeeType")]
    public class EmployeeType : NotifyPropertyChangedBase
    {
        private int id;
        private string typeName;
        private string description;

        [DataMember]
        public int ID
        {
            get { return id; }
            set
            {
                if (!id.Equals(value))
                {
                    id = value;
                    RaisePropertyChanged("ID");
                }
            }
        }

        [DataMember]
        public string TypeName
        {
            get { return typeName; }
            set
            {
                if (!ReferenceEquals(value, typeName))
                {
                    typeName = value;
                    RaisePropertyChanged("TypeName");
                }
            }
        }

        [DataMember]
        public string Description
        {
            get { return description; }
            set
            {
                if (!ReferenceEquals(value, description))
                {
                    description = value;
                    RaisePropertyChanged("Description");
                }
            }
        }

    }
}
